package com.ws.game.lesson5.map
{
	import com.ws.game.common.components.SpriteLoader;
	import com.ws.game.common.global.Global;
	
	public class L5 extends SpriteLoader
	{
		protected var mapconfig:Array = [
			[0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0],
			[0, 2, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0],
			[0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0],
			[0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0],
			[1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1],
			[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
			[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
			[1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1],
			[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
			[0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0]                        
		];
		
		public function L5()
		{
			super();
			
		}
		
		override protected function addGameObjects():void{
			while(this.numChildren>0){
				this.removeChildAt(0);
			}
			var ma:MapScen = new MapScen(this.parent.stage);
			ma.setup(mapconfig);			
			
			this.gSce = ma;		
			this.addChild(gSce);
		}
	}
}